
<!DOCTYPE HTML>
<html lang="zh-hans" >
    <head>
        <meta charset="UTF-8">
        <meta content="text/html; charset=utf-8" http-equiv="Content-Type">
        <title>Go 语言环境安装 · itcode</title>
        <meta http-equiv="X-UA-Compatible" content="IE=edge" />
        <meta name="description" content="">
        <meta name="generator" content="GitBook 3.2.3">
        <meta name="author" content="wangmaolin">
        
        
    
    <link rel="stylesheet" href="../../gitbook/style.css">

    
            
                
                <link rel="stylesheet" href="../../gitbook/gitbook-plugin-search-pro/search.css">
                
            
                
                <link rel="stylesheet" href="../../gitbook/gitbook-plugin-toggle-chapters/toggle.css">
                
            
                
                <link rel="stylesheet" href="../../gitbook/gitbook-plugin-splitter/splitter.css">
                
            
                
                <link rel="stylesheet" href="../../gitbook/gitbook-plugin-donate/plugin.css">
                
            
                
                <link rel="stylesheet" href="../../gitbook/gitbook-plugin-advanced-emoji/emoji-website.css">
                
            
                
                <link rel="stylesheet" href="../../gitbook/gitbook-plugin-tbfed-pagefooter/footer.css">
                
            
                
                <link rel="stylesheet" href="../../gitbook/gitbook-plugin-anchors/plugin.css">
                
            
                
                <link rel="stylesheet" href="../../gitbook/gitbook-plugin-highlight/website.css">
                
            
                
                <link rel="stylesheet" href="../../gitbook/gitbook-plugin-fontsettings/website.css">
                
            
        

    

    
        
    
        
    
        
    
        
    
        
    
        
    

        
    
    
    <meta name="HandheldFriendly" content="true"/>
    <meta name="viewport" content="width=device-width, initial-scale=1, user-scalable=no">
    <meta name="apple-mobile-web-app-capable" content="yes">
    <meta name="apple-mobile-web-app-status-bar-style" content="black">
    <link rel="apple-touch-icon-precomposed" sizes="152x152" href="../../gitbook/images/apple-touch-icon-precomposed-152.png">
    <link rel="shortcut icon" href="../../gitbook/images/favicon.ico" type="image/x-icon">

    
    <link rel="next" href="Go语言结构.html" />
    
    
    <link rel="prev" href="./" />
    

    </head>
    <body>
        
<div class="book">
    <div class="book-summary">
        
            
<div id="book-search-input" role="search">
    <input type="text" placeholder="输入并搜索" />
</div>

            
                <nav role="navigation">
                


<ul class="summary">
    
    
    
        
        <li>
            <a href="http://itcode.wiki" target="_blank" class="custom-link">Home</a>
        </li>
    
    

    
    <li class="divider"></li>
    

    
        
        
    
        <li class="chapter " data-level="1.1" data-path="../../">
            
                <a href="../../">
            
                    
                    介绍
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.2" data-path="./">
            
                <a href="./">
            
                    
                    Go语言学习
            
                </a>
            

            
            <ul class="articles">
                
    
        <li class="chapter active" data-level="1.2.1" data-path="Go语言环境安装.html">
            
                <a href="Go语言环境安装.html">
            
                    
                    Go 语言环境安装
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.2.2" data-path="Go语言结构.html">
            
                <a href="Go语言结构.html">
            
                    
                    Go 语言结构
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.2.3" data-path="Go语言基础语法.html">
            
                <a href="Go语言基础语法.html">
            
                    
                    Go 语言基础语法
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.2.4" data-path="Go语言数据类型.html">
            
                <a href="Go语言数据类型.html">
            
                    
                    Go 语言数据类型
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.2.5" data-path="Go语言变量&变量声明.html">
            
                <a href="Go语言变量&变量声明.html">
            
                    
                    Go 语言变量 & 变量声明
            
                </a>
            

            
        </li>
    

            </ul>
            
        </li>
    

    

    <li class="divider"></li>

    <li>
        <a href="https://www.gitbook.com" target="blank" class="gitbook-link">
            本书使用 GitBook 发布
        </a>
    </li>
</ul>


                </nav>
            
        
    </div>

    <div class="book-body">
        
            <div class="body-inner">
                
                    

<div class="book-header" role="navigation">
    

    <!-- Title -->
    <h1>
        <i class="fa fa-circle-o-notch fa-spin"></i>
        <a href="../.." >Go 语言环境安装</a>
    </h1>
</div>




                    <div class="page-wrapper" tabindex="-1" role="main">
                        <div class="page-inner">
                            
<div id="book-search-results">
    <div class="search-noresults">
    
                                <section class="normal markdown-section">
                                
                                <h2 id="unixlinuxmac-os-x-&#x548C;-freebsd-&#x4E0B;&#x5B89;&#x88C5;"><a name="unixlinuxmac-os-x-&#x548C;-freebsd-&#x4E0B;&#x5B89;&#x88C5;" class="plugin-anchor" href="#unixlinuxmac-os-x-&#x548C;-freebsd-&#x4E0B;&#x5B89;&#x88C5;"><i class="fa fa-link" aria-hidden="true"></i></a>UNIX/Linux/Mac OS X, &#x548C; FreeBSD &#x4E0B;&#x5B89;&#x88C5;</h2>
<blockquote>
<p>&#x4EE5;&#x4E0B;&#x4ECB;&#x7ECD;&#x4E86;&#x5728;UNIX/Linux/Mac OS X, &#x548C; FreeBSD&#x7CFB;&#x7EDF;&#x4E0B;&#x4F7F;&#x7528;&#x6E90;&#x7801;&#x5B89;&#x88C5;&#x65B9;&#x6CD5;&#xFF1A;</p>
</blockquote>
<pre><code>1&#x3001;&#x4E0B;&#x8F7D;&#x6E90;&#x7801;&#x5305;&#xFF1A;go1.4.linux-amd64.tar.gz&#x3002;

&#x5B89;&#x88C5;&#x5305;&#x4E0B;&#x8F7D;&#x5730;&#x5740;&#xFF1A; https://golang.org/dl/

2&#x3001;&#x5C06;&#x4E0B;&#x8F7D;&#x7684;&#x6E90;&#x7801;&#x5305;&#x89E3;&#x538B;&#x81F3; /usr/local&#x76EE;&#x5F55;&#x3002;

tar -C /usr/local -xzf go1.4.linux-amd64.tar.gz

3&#x3001;&#x5C06; /usr/local/go/bin &#x76EE;&#x5F55;&#x6DFB;&#x52A0;&#x81F3;PATH&#x73AF;&#x5883;&#x53D8;&#x91CF;&#xFF1A;

export PATH=$PATH:/usr/local/go/bin
</code></pre><blockquote>
<p>&#x6CE8;&#x610F;&#xFF1A;MAC &#x7CFB;&#x7EDF;&#x4E0B;&#x4F60;&#x53EF;&#x4EE5;&#x4F7F;&#x7528; .pkg &#x7ED3;&#x5C3E;&#x7684;&#x5B89;&#x88C5;&#x5305;&#x76F4;&#x63A5;&#x53CC;&#x51FB;&#x6765;&#x5B8C;&#x6210;&#x5B89;&#x88C5;&#xFF0C;&#x5B89;&#x88C5;&#x76EE;&#x5F55;&#x5728; /usr/local/go/ &#x4E0B;&#x3002;</p>
</blockquote>
<h2 id="mac-&#x4E0B;&#x53EF;&#x901A;&#x8FC7;-brew-&#x5B89;&#x88C5;"><a name="mac-&#x4E0B;&#x53EF;&#x901A;&#x8FC7;-brew-&#x5B89;&#x88C5;" class="plugin-anchor" href="#mac-&#x4E0B;&#x53EF;&#x901A;&#x8FC7;-brew-&#x5B89;&#x88C5;"><i class="fa fa-link" aria-hidden="true"></i></a>MAC &#x4E0B;&#x53EF;&#x901A;&#x8FC7; brew &#x5B89;&#x88C5;</h2>
<pre><code>brew install go

&#x6216;&#x8005;

brew install golang 
</code></pre><footer class="page-footer"><span class="copyright">Copyright &#xA9; wml 2018 all right reserved&#xFF0C;powered by Gitbook</span><span class="footer-modification">&#x8BE5;&#x6587;&#x4EF6;&#x4FEE;&#x8BA2;&#x65F6;&#x95F4;&#xFF1A;
2018-07-08 14:55:56
</span></footer>
                                
                                </section>
                            
    </div>
    <div class="search-results">
        <div class="has-results">
            
            <h1 class="search-results-title"><span class='search-results-count'></span> results matching "<span class='search-query'></span>"</h1>
            <ul class="search-results-list"></ul>
            
        </div>
        <div class="no-results">
            
            <h1 class="search-results-title">No results matching "<span class='search-query'></span>"</h1>
            
        </div>
    </div>
</div>

                        </div>
                    </div>
                
            </div>

            
                
                <a href="./" class="navigation navigation-prev " aria-label="Previous page: Go语言学习">
                    <i class="fa fa-angle-left"></i>
                </a>
                
                
                <a href="Go语言结构.html" class="navigation navigation-next " aria-label="Next page: Go 语言结构">
                    <i class="fa fa-angle-right"></i>
                </a>
                
            
        
    </div>

    <script>
        var gitbook = gitbook || [];
        gitbook.push(function() {
            gitbook.page.hasChanged({"page":{"title":"Go 语言环境安装","level":"1.2.1","depth":2,"next":{"title":"Go 语言结构","level":"1.2.2","depth":2,"path":"category/go/Go语言结构.md","ref":"category/go/Go语言结构.md","articles":[]},"previous":{"title":"Go语言学习","level":"1.2","depth":1,"path":"category/go/README.md","ref":"category/go/README.md","articles":[{"title":"Go 语言环境安装","level":"1.2.1","depth":2,"path":"category/go/Go语言环境安装.md","ref":"category/go/Go语言环境安装.md","articles":[]},{"title":"Go 语言结构","level":"1.2.2","depth":2,"path":"category/go/Go语言结构.md","ref":"category/go/Go语言结构.md","articles":[]},{"title":"Go 语言基础语法","level":"1.2.3","depth":2,"path":"category/go/Go语言基础语法.md","ref":"category/go/Go语言基础语法.md","articles":[]},{"title":"Go 语言数据类型","level":"1.2.4","depth":2,"path":"category/go/Go语言数据类型.md","ref":"category/go/Go语言数据类型.md","articles":[]},{"title":"Go 语言变量 & 变量声明","level":"1.2.5","depth":2,"path":"category/go/Go语言变量&变量声明.md","ref":"category/go/Go语言变量&变量声明.md","articles":[]}]},"dir":"ltr"},"config":{"plugins":["-lunr","-search","search-pro","toggle-chapters","splitter","donate","github","edit-link","advanced-emoji","tbfed-pagefooter","simple-page-toc","baidu","changyan","anchors","sitemap-general","livereload"],"styles":{"website":"styles/website.css","pdf":"styles/pdf.css","epub":"styles/epub.css","mobi":"styles/mobi.css","ebook":"styles/ebook.css","print":"styles/print.css"},"pluginsConfig":{"tbfed-pagefooter":{"copyright":"Copyright &copy wml 2018","modify_label":"该文件修订时间：","modify_format":"YYYY-MM-DD HH:mm:ss"},"github":{"url":"https://gitee.com/wmlhub/gitbook/tree/master"},"livereload":{},"simple-page-toc":{"maxDepth":3,"skipFirstH1":false},"splitter":{},"search-pro":{"cutWordLib":"nodejieba","defineWord":["gitbook-use"]},"donate":{"alipay":"","alipayText":"支付宝打赏","button":"赏","title":"","wechat":"","wechatText":"微信打赏"},"sitemap-general":{"prefix":"http://itcode.wiki"},"changyan":{"appid":"cytowLiqM","conf":"the conf in the code generate by changyan"},"fontsettings":{"theme":"white","family":"sans","size":2},"highlight":{},"sitemap":{"hostname":"https://wmlhub.gitee.io/gitbook/"},"baidu":{"token":"084b900a1e26f6bae60e09d18e3aa455"},"advanced-emoji":{"embedEmojis":false},"sharing":{"facebook":true,"twitter":true,"google":false,"weibo":true,"instapaper":false,"vk":false,"all":["facebook","google","twitter","weibo","instapaper"]},"edit-link":{"label":"Edit This Page","base":"https://gitee.com/wmlhub/gitbook/tree/master"},"theme-default":{"styles":{"website":"styles/website.css","pdf":"styles/pdf.css","epub":"styles/epub.css","mobi":"styles/mobi.css","ebook":"styles/ebook.css","print":"styles/print.css"},"showLevel":false},"anchors":{},"toggle-chapters":{}},"theme":"default","author":"wangmaolin","pdf":{"pageNumbers":true,"fontSize":12,"fontFamily":"Arial","paperSize":"a4","chapterMark":"pagebreak","pageBreaksBefore":"/","margin":{"right":62,"left":62,"top":56,"bottom":56}},"structure":{"langs":"LANGS.md","readme":"README.md","glossary":"GLOSSARY.md","summary":"SUMMARY.md"},"variables":{},"title":"itcode","language":"zh-hans","links":{"sidebar":{"Home":"http://itcode.wiki"}},"gitbook":"3.2.3","description":"记录自己日常学习总结"},"file":{"path":"category/go/Go语言环境安装.md","mtime":"2018-07-08T06:55:56.326Z","type":"markdown"},"gitbook":{"version":"3.2.3","time":"2018-07-08T07:27:40.150Z"},"basePath":"../..","book":{"language":""}});
        });
    </script>
</div>

        
    <script src="../../gitbook/gitbook.js"></script>
    <script src="../../gitbook/theme.js"></script>
    
        
        <script src="../../gitbook/gitbook-plugin-search-pro/jquery.mark.min.js"></script>
        
    
        
        <script src="../../gitbook/gitbook-plugin-search-pro/search.js"></script>
        
    
        
        <script src="../../gitbook/gitbook-plugin-toggle-chapters/toggle.js"></script>
        
    
        
        <script src="../../gitbook/gitbook-plugin-splitter/splitter.js"></script>
        
    
        
        <script src="../../gitbook/gitbook-plugin-donate/plugin.js"></script>
        
    
        
        <script src="../../gitbook/gitbook-plugin-github/plugin.js"></script>
        
    
        
        <script src="../../gitbook/gitbook-plugin-edit-link/plugin.js"></script>
        
    
        
        <script src="../../gitbook/gitbook-plugin-baidu/plugin.js"></script>
        
    
        
        <script src="../../gitbook/gitbook-plugin-changyan/changyan.js"></script>
        
    
        
        <script src="../../gitbook/gitbook-plugin-livereload/plugin.js"></script>
        
    
        
        <script src="../../gitbook/gitbook-plugin-sharing/buttons.js"></script>
        
    
        
        <script src="../../gitbook/gitbook-plugin-fontsettings/fontsettings.js"></script>
        
    

    </body>
</html>

